﻿<%@ Page Title="Crie sua Conta" Language="C#" MasterPageFile="~/Cash.Master" AutoEventWireup="true" CodeBehind="CriarConta.aspx.cs" Inherits="Cash.View.CriarConta" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<script type="text/javascript">
    function redirecionar() {
        var investimento = document.getElementById('<%= hddResult.ClientID %>').value;
        if (investimento == "0") {
            window.location = "Funcionario.aspx?Acao=Pesq";
        }
    }
    </script>
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel runat="server" ID="UpdatePanel" UpdateMode="Conditional">
        <ContentTemplate>
            <table cellpadding="4" cellspacing="0" class="table" style="border-collapse: collapse;"
                align="center">
                <tr>
                    <td align="center" colspan="2" class="titletable">
                        <asp:HiddenField ID="hddResult" runat="server" Value="0" />
                        Crie Sua Conta
                    </td>
                </tr>
                <tr>
                    <td style="width: 45%" align="right">
                        <asp:Label ID="lblNome" runat="server">Nome* : </asp:Label>
                    </td>
                    <td align="left" style="width: 456px">
                        <asp:TextBox ID="txtNome" runat="server" Width="250px" MaxLength="299"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="txtNome"
                            ValidationGroup="valEmpresa" class="validacaoCampos">* Campo obrigatório.</asp:RequiredFieldValidator>
                    </td>
                </tr>
                <!-- Nome -->
                <tr>
                    <td style="width: 45%" align="right">
                        <asp:Label ID="lblSexo" runat="server">Sexo* : </asp:Label>
                    </td>
                    <td align="left" style="width: 456px">
                        <asp:DropDownList ID="ddlSexo" runat="server" Width="250px">
                            <asp:ListItem Selected="True" Value="0"><< Selecione >></asp:ListItem>
                            <asp:ListItem Value="F">Feminino</asp:ListItem>
                            <asp:ListItem Value="M">Masculino</asp:ListItem>
                        </asp:DropDownList>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server" ControlToValidate="ddlSexo"
                            InitialValue="0" ValidationGroup="valEmpresa" class="validacaoCampos">* Campo obrigatório.</asp:RequiredFieldValidator>
                    </td>
                </tr>
                <!-- SEXO -->
                <tr>
                    <td style="width: 45%" align="right">
                        <asp:Label ID="lblNascimento" runat="server">Data Nascimento* : </asp:Label>
                    </td>
                    <td align="left" style="width: 456px">
                        <asp:TextBox ID="txtNascimento" runat="server" Width="250px" onfocus="showCalendarControl(this);"
                            Class="data" MaxLength="10"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtNascimento"
                            ValidationGroup="valEmpresa" class="validacaoCampos">* Campo obrigatório.</asp:RequiredFieldValidator>
                    </td>
                </tr>
                <!-- Data Nascimento -->
                <tr>
                    <td style="width: 45%" align="right">
                        <asp:Label ID="lblEmail" runat="server">E-mail:</asp:Label>
                    </td>
                    <td align="left" style="width: 456px">
                        <asp:TextBox ID="txtEmail" runat="server" Width="250px" MaxLength="250"></asp:TextBox>
                        <asp:RegularExpressionValidator ID="regexEmailValid" runat="server" ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
                            ControlToValidate="txtEmail" ErrorMessage="E-mail inválido." class="validacaoCampos"
                            ValidationGroup="valEmpresa"></asp:RegularExpressionValidator>
                    </td>
                </tr>
                <!-- Email -->
                <tr>
                    <td style="width: 45%" align="right">
                        <asp:Label ID="lblSenha" runat="server">Senha* : </asp:Label>
                    </td>
                    <td align="left" style="width: 456px">
                        <asp:TextBox ID="txtSenha" runat="server" TextMode="Password" Width="250px" MaxLength="50"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="txtSenha"
                            ValidationGroup="valEmpresa" class="validacaoCampos">* Campo obrigatório.</asp:RequiredFieldValidator>
                    </td>
                </tr>
                <!-- Senha -->
                <tr>
                    <td style="width: 45%" align="right">
                        <asp:Label ID="lblConfSenha" runat="server">Confirmação senha* : </asp:Label>
                    </td>
                    <td align="left" style="width: 456px">
                        <asp:TextBox ID="txtConfSenha" runat="server" TextMode="Password" Width="250px" MaxLength="50"
                            OnFocus="txtConfSenha_onFocus"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="ConfirmPasswordRequired" runat="server" ControlToValidate="txtConfSenha"
                            ValidationGroup="valEmpresa" class="validacaoCampos">* Campo obrigatório.</asp:RequiredFieldValidator>
                    </td>
                </tr>
                <!-- Confere Senha -->
                <tr>
                    <td align="center" colspan="2">
                        <asp:CompareValidator ID="PasswordCompare" runat="server" ControlToCompare="txtSenha"
                            ControlToValidate="txtConfSenha" Display="Dynamic" ErrorMessage="Senha não confere."
                            ValidationGroup="valEmpresaOLD" class="validacaoCampos"></asp:CompareValidator>
                    </td>
                </tr>
                <!-- Valida Senha -->
                <tr>
                    <td align="left" colspan="2">
                        <asp:Label ID="lblObrigatorio" runat="server" CssClass="lblObrigatorio">* Campos obrigatórios</asp:Label>
                    </td>
                </tr>
                <tr>
                    <td align="center" colspan="2">
                        <asp:Literal ID="ErrorMessage" runat="server" EnableViewState="False"></asp:Literal>
                    </td>
                </tr>
                <tr>
                    <td align="center" colspan="2">
                        <asp:Button ID="btnCancelar" runat="server" CssClass="button" Text="Cancelar" PostBackUrl="~/View/Login.aspx" />
                        &nbsp&nbsp&nbsp&nbsp&nbsp
                        <asp:Button ID="btnCadastrar" runat="server" CommandName="Submit" CssClass="button"
                            Text="Cadastrar" ValidationGroup="valEmpresa" OnClick="btnCadastrar_Click" />
                    </td>
                </tr>
            </table>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
